﻿namespace BestEasyCMS.Framework.CacheStorage
{
    /// <summary>
    /// 缓存接口
    /// </summary>
    public interface ICacheStorage
    {
        /// <summary>
        /// 移除缓存
        /// </summary>
        /// <param name="key">键</param>
        void Remove(string key);
        /// <summary>
        /// 添加缓存
        /// </summary>
        /// <param name="key">键</param>
        /// <param name="data">值</param>
        void Store(string key, object data);
        /// <summary>
        /// 检索缓存
        /// </summary>
        /// <typeparam name="T">对象</typeparam>
        /// <param name="storageKey">值</param>
        /// <returns>缓存数据</returns>
        T Retrieve<T>(string storageKey);
    }
}
